package com.kaifamiao.wendao.entity;

import java.time.LocalDateTime;
import java.util.List;

public class Customer {

    private Integer id ;
    private String username ;
    private String password ;
    private String salt ;
    private String nickname ;
    private LocalDateTime signUpTime ;
    private String signUpIp ;
    // 当前客户发表的所有话题
    private List<Topic> topics ; // 维护从 Customer 到 Topic 的 一对多 关联关系

    public Customer() {
        super();
    }

    public Customer(String username, String password, String nickname, String signUpIp) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.signUpIp = signUpIp;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", nickname='" + nickname + '\'' +
                ", signUpTime=" + signUpTime +
                ", signUpIp='" + signUpIp + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public LocalDateTime getSignUpTime() {
        return signUpTime;
    }

    public void setSignUpTime(LocalDateTime signUpTime) {
        this.signUpTime = signUpTime;
    }

    public String getSignUpIp() {
        return signUpIp;
    }

    public void setSignUpIp(String signUpIp) {
        this.signUpIp = signUpIp;
    }

    public List<Topic> getTopics() {
        return topics;
    }

    public void setTopics(List<Topic> topics) {
        this.topics = topics;
    }
}
